package com.xing.util;

public class KeyUtils {
    //保存文章被收藏数量的key
    public static final String MAP_KEY_COLLECT_COUNT = "MAP_KEY_COLLECT_COUNT";

    //保存收藏信息的key
    public static final String MAP_KEY_COLLECT= "MAP_KEY_COLLECT";

    //保存文章被点赞数量的key
    public static final String MAP_KEY_LIKE_COUNT = "MAP_KEY_LIKE_COUNT";

    //保存点赞信息的key
    public static final String MAP_KEY_LIKE= "MAP_KEY_LIKE";

    //点赞热点文章排行榜的key
    public static final String MAP_KEY_HOTTOP= "MAP_KEY_HOTTOP";

    //最新评论，公共组件
    public static final String MAP_KEY_NEW_DISCUSS= "MAP_KEY_NEW_DISCUSS";



    /**
     * 拼接用户ip和文章id作为key。格式 222222::333333
     * @param uip 用户ip
     * @param aid 文章id
     * @return
     */
    public static String getKey(String uip, String aid){
        StringBuilder builder = new StringBuilder();
        builder.append(uip);
        builder.append("::");
        builder.append(aid);
        return builder.toString();
    }
}
